<!DOCTYPE html>
<html lang="zh">
<head>
    <th:block th:include="include :: header('文件上传')"/>
    <th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body class="gray-bg">
<form>
    <input type="hidden" name="docRegId" id="docRegId" th:value="${docRegId}"/>
    <input type="hidden" name="instanceId" id="instanceId" th:value="${instanceId}"/>
    <input type="hidden" name="docCode" id="docCode" th:value="${docCode}"/>
</form>
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <div class="form-group">
                        <div class="file-loading">
                            <input id="multipleFile" name="files" type="file" multiple>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: bootstrap-fileinput-js"/>
<script th:inline="javascript">

    $(document).ready(function () {
        // 多图上传
        $("#multipleFile").fileinput({
            uploadUrl: ctx + 'busiflw/docReg/uploads/' + $("#docRegId").val() + '/' + $("#instanceId").val() + '/' + $("#docCode").val(),
            uploadAsync: false
        }).on('filebatchuploadsuccess', function (event, data, previewId, index) {
            var rsp = data.response;
        }).on('fileremoved', function (event, id, index) {
            $("input[name='" + event.currentTarget.id + "']").val('')
        })
    });
</script>
</body>
</html>
